<?php
/**
 * Created by PhpStorm.
 * User: 氓羽
 * Date: 2018-4-17
 * Time: 21:20
 */
 class A{
     public $name = "";
     public function go(){
         echo "111111111";
     }
 }

 function test(A $a){
     $a->go();
 }

 test(new A);